package tech.realcpf.duckengine1.duckdb;

import java.sql.ResultSet;
import java.sql.SQLException;

public class SingleObjectProcessor implements ResultProcessor{
    @Override
    public Object process(ResultSet rs, boolean close) throws SQLException {
        if (rs.next()) {
            Object obj = rs.getObject(1);
            if (close) {
                rs.close();
            }
            return obj;
        }
        return null;
    }
}
